package com.es.hr.emp;

import javax.servlet.http.HttpServletRequest;

import com.es.main.LoginUserBeen;
import com.es.util.common.CommonBiz;
import com.opensymphony.webwork.interceptor.ServletRequestAware;
import com.opensymphony.xwork.ActionSupport;

public class CreateEmpInfoInitAction extends ActionSupport implements ServletRequestAware{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	HttpServletRequest request;
	 
	   public String execute()throws Exception
	   {
		   CommonBiz biz = new CommonBiz((LoginUserBeen)request.getSession(false).getAttribute("loginuser"));
		   String message = (String)request.getAttribute("message");
		   //区域列表
		   request.setAttribute("areaList", biz.getAreaList());
		   //角色
		   request.setAttribute("roleList", biz.getCommonList("role"));
		   //户口
		   request.setAttribute("hukouList", biz.getCommonList("hukoutype"));
		   //未参保原因
		   request.setAttribute("weicanbaoList", biz.getCommonList("weicanbao"));
		   //社保性质
		   request.setAttribute("shebaoList", biz.getCommonList("shebao"));
		   //开卡银行
		   request.setAttribute("bankList", biz.getCommonList("bank"));
		   //合同类型
		   request.setAttribute("hetongList", biz.getCommonList("hetong"));
		   //学历
		   request.setAttribute("xueliList", biz.getCommonList("xueli"));
		   //大区
		   request.setAttribute("daquList", biz.getCommonList("daqu"));
		   //事业部
		   request.setAttribute("shiyebu", request.getParameter("shiyebu"));
		   if(message!=null)
			   request.setAttribute("message", message);
		   if(request.getParameter("shiyebu").equals("ACER-FBU"))
			   return "success2";
		   else
			   return "success1";
	   }
	
	   public void setServletRequest(HttpServletRequest request) {
		     this.request = request;
		   }
}
